<?php for ($i = 1; $i <= $detail['adult']; $i++): ?>
    <div id="titlemerah"><p align="left">Penumpang Dewasa <?php if ($adult_count > 1) echo $i ?></p></div><br />
    <table class="table " width="620" >
        <tr>
            <td>Nama</td>
            <td style="font-size:12px;">Title<br />
                <?php if ($i <= 1): ?>
                    <?php echo form_dropdown('adult[' . $i . '][title_adult]', $title, '', "onchange='document.myform.title_dk.value = this.value;' class='span1'") ?>
                <?php else: ?>
                    <?php echo form_dropdown('adult[' . $i . '][title_adult]', $title, '', "class='span1'") ?>
                <?php endif ?>
            </td>
            <td style="font-size:12px;">
                Nama Depan <small style="font-size:8px; color:#bf0d31">*)Max 12 Char</small><br />
                <input class="namablkg" tipe="text" name="adult[<?php echo $i ?>][nama_depan]" onkeyup="<?php if ($i <= 1) { ?>namadepan(this.value)<?php } ?>" >
            </td>
            <td style="font-size:12px;">
                Nama Belakang <small style="font-size:8px; color:#bf0d31">*)Max 12 Char</small><br />
                <input tipe="text" name="adult[<?php echo $i ?>][nama_belakang]" onkeyup="<?php if ($i <= 1) { ?>namabelakang(this.value)<?php } ?>"  class="namablkg">
            </td>
            
            <?php echo form_hidden('adult[' . $i . '][code]', "$code") ?>
        </tr>
        <tr></tr>
        <tr>
            <td>No identitas</td>
            <td colspan="2">KTP/SIM/Passport<br /><?php echo form_input('adult[' . $i . '][identitas]', '', "class='span3'") ?><br />
    <!--                        Kebutuhan Khusus<br /><select class="span3"><option selected="selected">Tidak ada</option></select>-->
            </td>
            
            <td colspan="2">
                 <?php echo $detail['airlines_name'] ?> Passport no<br />
                <?php echo form_input('adult[' . $i . '][passport]', '', "class='span3'") ?>
            </td>
        </tr>
    </table>
<?php endfor ?>